};
typedef struct {
- char *bcr_name;
- char *mps_name;
- char *symbol_DE;
+ const char *bcr_name;
+ const char *mps_name;
+ const char *symbol_DE;
int warned;
} bcr_icon_mapping_t;
}
}
-static char *
+static const char *
get_bcr_icon_from_icon_descr(const char *icon_descr)
{
- char *result = BCR_DEF_ICON;
+ const char *result = BCR_DEF_ICON;
if (icon_descr) {
bcr_icon_mapping_t *m;
i = 0;
QUEUE_FOR_EACH(&route->waypoint_list, elem, tmp)
{
- char *icon;
+ const char *icon;
waypoint *wpt = (waypoint *) elem;
i++;
#define ARG_TERMINATOR {0, 0, 0, 0, 0, ARG_NOMINMAX}
typedef struct arglist {
- char *argstring;
+ const char *argstring;
char **argval;
- char *helpstring;
- char *defaultvalue;
- gbuint32 argtype;
- char *minvalue; /* minimum value for numeric options */
- char *maxvalue; /* maximum value for numeric options */
- char *argvalptr; /* !!! internal helper. Not used in definitions !!! */
+ const char *helpstring;
+ const char *defaultvalue;
+ const gbuint32 argtype;
+ const char *minvalue; /* minimum value for numeric options */
+ const char *maxvalue; /* maximum value for numeric options */
+ const char *argvalptr; /* !!! internal helper. Not used in definitions !!! */
} arglist_t;
typedef enum {
ff_write write;
ff_exit exit;
arglist_t *args;
- char *encode;
+ const char *encode;
int fixed_encode;
position_ops_t position_ops;
const char *name; /* dyn. initialized by find_vec */
char * strip_nastyhtml(const char * in);
char * convert_human_date_format(const char *human_datef); /* "MM,YYYY,DD" -> "%m,%Y,%d" */
char * convert_human_time_format(const char *human_timef); /* "HH+mm+ss" -> "%H+%M+%S" */
-char * pretty_deg_format(double lat, double lon, char fmt, char *sep, int html); /* decimal -> dd.dddd or dd mm.mmm or dd mm ss */
+char * pretty_deg_format(double lat, double lon, char fmt, const char *sep, int html); /* decimal -> dd.dddd or dd mm.mmm or dd mm ss */
char * get_filename(const char *fname); /* extract the filename portion */
/* this lives in gpx.c */
time_t xml_parse_time( const char *cdatastr, int * microsecs );
-xml_tag *xml_findfirst( xml_tag *root, char *tagname );
-xml_tag *xml_findnext( xml_tag *root, xml_tag *cur, char *tagname );
-char *xml_attribute( xml_tag *tag, char *attrname );
+xml_tag *xml_findfirst( xml_tag *root, const char *tagname );
+xml_tag *xml_findnext( xml_tag *root, xml_tag *cur, const char *tagname );
+char *xml_attribute( xml_tag *tag, const char *attrname );
char * rot13( const char *str );
};
typedef struct {
- char *shortname;
- char *longname;
+ const char *shortname;
+ const char *longname;
grid_type grid;
} grid_mapping_t;
/* gt_mps_datum_names: */
typedef struct {
- char *jeeps_name;
- char *mps_name;
+ const char *jeeps_name;
+ const char *mps_name;
} datum_mapping_t;
/* will be continued (when requested) */
};
typedef struct garmin_color_s {
- char *name;
+ const char *name;
gbint32 rgb;
} garmin_color_t;
typedef struct gt_country_code_s
{
- char *cc;
- char *country;
+ const char *cc;
+ const char *country;
} gt_country_code_t;
extern gt_country_code_t gt_country_codes[];
static int
-gcdb_add_to_rec(struct dbrec *rec, char *fldname, gcdb_rectype rectype, void *data)
+gcdb_add_to_rec(struct dbrec *rec, const char *fldname, gcdb_rectype rectype, void *data)
{
int length;
static int rec_cnt;
}
}
-static char *geoniche_icon_map[] = /* MPS */
+static const char *geoniche_icon_map[] = /* MPS */
{
/* 21 */ "Cross",
/* 22 */ "Cross (light)",
igo8_id_block tmp_id_block;
p_igo8_id_block id_block = (p_igo8_id_block)header;
gbuint32 current_position = 0;
- char* title = "Title";
- char* description = "Description";
+ const char* title = "Title";
+ const char* description = "Description";
// These values seem to be constant for me, but I have no idea what they are.
tmp_id_block.unknown_1 = 0x0000029B;
CET_CHARSET_UTF8,
1
};
-
-
static int csv_line(gbfile *csvFile, int idx, unsigned long bmask, struct data_item *itm){
struct tm *ts_tm;
char ts_str[30];
- char *fix_str = "";
+ const char *fix_str = "";
ts_tm = gmtime(&(itm->timestamp));
strftime(ts_str, sizeof(ts_str)-1, "%Y/%m/%d,%H:%M:%S", ts_tm);
{ NULL, 0, NULL }
};
-static char *osm_features[] = {
+static const char *osm_features[] = {
"- dummy -", /* 0 */
"aeroway", /* 1 */
"amenity", /* 2 */
bookmark_tail = newmark;
}
-static void docprintf( int maxlen, char *format, ... ) {
+static void docprintf( int maxlen, const char *format, ... ) {
char *txt = NULL;
char *txt2 = NULL;
/* Bitmaps */
typedef struct {
- char *name;
- char *mps_name;
+ const char *name;
+ const char *mps_name;
} raymarine_symbol_mapping_t;
static raymarine_symbol_mapping_t raymarine_symbols[] = {
write_route_wpt_cb(const waypoint *wpt)
{
int i;
- static char *items[] = {
+ static const char *items[] = {
"Cog",
"Eta",
"Length",
#define unicsv_unknown 1e25
typedef struct {
- char *name;
+ const char *name;
field_e type;
gbuint32 options;
} field_t;
static int unicsv_fields_tab_ct;
static double unicsv_altscale, unicsv_depthscale, unicsv_proximityscale
;
-static char *unicsv_fieldsep;
+static const char *unicsv_fieldsep;
static gbfile *fin, *fout;
static gpsdata_type unicsv_data_type;
static route_head *unicsv_track, *unicsv_route;
strenquote(const char *str, const char quot_char)
{
int len;
- char *cin, *cout;
+ const char *cin;
+ char *cout;
char *tmp;
if (str == NULL) cin = "";
* html = 1 for html output otherwise text
*/
char *
-pretty_deg_format(double lat, double lon, char fmt, char *sep, int html)
+pretty_deg_format(double lat, double lon, char fmt, const char *sep, int html)
{
double latmin, lonmin, latsec, lonsec;
int latint, lonint;
return cur;
}
-xml_tag *xml_findnext( xml_tag *root, xml_tag *cur, char *tagname )
+xml_tag *xml_findnext( xml_tag *root, xml_tag *cur, const char *tagname )
{
xml_tag *result = cur;
do {
return result;
}
-xml_tag *xml_findfirst( xml_tag *root, char *tagname )
+xml_tag *xml_findfirst( xml_tag *root, const char *tagname )
{
return xml_findnext( root, root, tagname );
}
-char *xml_attribute( xml_tag *tag, char *attrname )
+char *xml_attribute( xml_tag *tag, const char *attrname )
{
char *result = NULL;
if ( tag->attributes ) {
Introduced in GPSBabel 1.3.1, we now have an <emphasis>experimental</emphasis> feature for realtime tracking via the new <option>-T</option> option. This reads position reports from selected formats and writes an output file when a position report is received.
</para>
<para>
- As of this writing, Garmin's PVT protocol and NMEA are supported
+ As of this writing, <link linkend="fmt_garmin">Garmin's PVT
+ protocol</link> and
+ <link linkend="fmt_nmea">NMEA</link> are supported
inputs. KML, NMEA, and the variou XCSV formats are supported on
output. Additional formats may be added by interested parties
later.
</para>
<example>
<title>Read realtime positioning from Garmin USB, write to Keyhole Markup</title>
- <para><userinput>gpsbabel -T -i garmin -f usb: -o kml -F xxx.kml</userinput></para>
-</example>
- <para>
+ <para><userinput>gpsbabel -T -i garmin -f usb: -o kml -F xxx.kml</userinput></para>
+ <para>
Will read the USB-connected Garmin and rewrite 'xxx.kml' atomically,
- suitable for a self-refreshing network link in Google Earth.
- </para>
+ suitable for a self-refreshing network link in Google Earth.
+ </para>
+ </example>
+
+<example>
+ <title>Read realtime positioning from Wintec WBT-201 via Bluetooth on Mac, write to Keyhole Markup</title>
+ <para><userinput>gpsbabel -T -i nmea -f /dev/cu.G-Rays2-SPPslave-1 -o kml -F xxx.kml</userinput></para>
+ <para>
+ Will read the Wintec WBT-201 via Bluetooth, using the name that
+ the Mac assigned it, and rewrite 'xxx.kml' atomically,
+ suitable for a self-refreshing network link in Google Earth.
+ </para>
+</example>
+
+
+ <para>
+ Be sure to substitute an device name appropriate for your device
+ and OS, such as <filename>/dev/cu.usbserial</filename> or
+ <filename>/dev/cu.BT-GPS-37A695-BT-GPSCOM-1</filename>
+ for Mac, <filename>COM23:</filename> for Windows, or
+ <filename>usb:</filename> for
+ <link linkend="fmt_garmin">Garmin USB</link>. These names
+ (except the "usb:" parlance for Garmin USB) are assigned by
+ your operating system.
+
+ </para>
</sect1>
<sect1 id="batchfile">